/*
 * @Author: your name
 * @Date: 2021-04-04 16:26:41
 * @LastEditTime: 2021-04-04 16:48:30
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \shop\training-group-5-warehouse\dianshang\src\store\live.js
 */
//直播
import live from "../api/live";
export default {
    namespaced: true,
    state: {
        list: []
    },
    mutations: {
        SET_LIST(state, actions) {
            state.list = actions;
        }
    },
    actions: {
        getShopList({ commit }, payload) {
            return new Promise((resolve, reject) => {
                return live.shopList().then(res => {
                    if (res.code === 200) {
                        commit("SET_LIST", res.data.shopList);
                    }
                });
            });
        }
    },
}